﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace SimpleGame.ScreenManagement
{
    public abstract class GameScreen
    {

        #region Fields

        // screen manager which handles and manages all game screens
        protected ScreenManager screenManager;

        // true = screen is active and should be updating
        // false = screen is inactive and should not be updating
        protected bool isActive = true;
        // true = screen is hidden and should not be drawn
        // false = screen is not hidden and should be drawn
        protected bool isHidden = false;

        #endregion

        #region Properties

        /// <summary>
        /// Screen Manager which handles and manages all game screens.
        /// </summary>
        public ScreenManager ScreenManager
        {
            get { return screenManager; }
            internal set { screenManager = value; }
        }

        /// <summary>
        /// If screen is active it is updated.
        /// </summary>
        public bool IsActive
        {
            get { return isActive; }
            set { isActive = value;  }
        }

        /// <summary>
        /// If screen is hidden it is not drawn.
        /// </summary>
        public bool IsHidden
        {
            get { return isHidden; }
            set { isHidden = value; }
        }

        #endregion

        #region XNA Methods

        public virtual void LoadContent() { }

        public virtual void UnloadContent() { }

        public virtual void Update(GameTime gameTime) { }

        public virtual void Draw(GameTime gameTime) { }

        #endregion
    }
}